import Vue from "vue";

import VueRouter from "vue-router";

Vue.use(VueRouter);

let routes = [
  {
    path: "/",
    redirect: "/layout",
  },

  {
    path: "/layout",
    component: () => import(/*webpackChunkName:'layout'*/ "../views/Layout"),
    redirect: "/layout/search",
    children: [
      {
        path: "search",
        component: () =>
          import(/*webpackChunkName:'search'*/ "../views/search"),
      },
      {
        path: "attention",
        component: () =>
          import(/*webpackChunkName:'attention'*/ "../views/attention"),
      },
      {
        path: "community",
        component: () =>
          import(/*webpackChunkName:'community'*/ "../views/community"),
      },
      {
        path: "mine",
        component: () => import(/*webpackChunkName:'search'*/ "../views/mine"),
      },
      {
        path: "Podcast",
        component: () =>
          import(/*webpackChunkName:'Podcast'*/ "../views/Podcast"),
      },
      {
        path: "songListItem",
        name: "songListItems",
        component: () =>
          import(/*webpackChunkName:'songListItem'*/ "../views/songListItem"),
      },

      {
        path: "searchSong",
        name: "searchSong",
        component: () =>
          import(/*webpackChunkName:'searchSong'*/ "../views/searchSong"),
      },
    ],
  },
];

let router = new VueRouter({ routes });

export default router;
